
** set path
gl path "~/"

use "$path/Replication/exact_matched.dta", clear

// reshape data wide
reshape wide g_ homeowner count, i(outcome_path year) j(treated_group)

// collapse by year
preserve
collapse (mean) g_0 [fweight=tot], by(year)
tempfile temp
save `temp'
restore
collapse (mean) g_1 [fweight=tot], by(year)
merge 1:1 year using `temp'

graph twoway line g_1 g_0 year, ///
	xtitle("") ytitle("Rate of Turnout in General Election") legend(off) ///
	ylab(0.15(0.05)0.4) yscale(range(0.15 0.4)) ///
	text(.405 2013 "2008-9 Home Buyers", size(small)) ///
	text(.180 2013 "Non-Homeowners", size(small) color(gray) ) scale(1.3) xline(2008, lcolor(gs12))

graph export "$path/Replication/figure1.pdf", replace
graph export "$path/Replication/figure1.eps", replace
